package com.atguigu.gmall.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.transaction.annotation.EnableTransactionManagement;


/*
* 1 导入nacos依赖， 要配置nacos
* 2 导入mybatisPlus 配置数据库
* */
//@EnableCircuitBreaker   //开启 熔断降级
//@EnableDiscoveryClient  //开启注册发发现服务
//@SpringBootApplication

@EnableFeignClients(basePackages = "com.atguigu.gmall.feign.search")
@EnableTransactionManagement //开启基于注解的自动事务功能
@MapperScan(basePackages = "com.atguigu.gmall.product.mapper")
@SpringCloudApplication  // 微服务 + 熔断 + 服务发现
public class ProductMainApplication {
    public static void main(String[] args) {

        SpringApplication.run(ProductMainApplication.class, args);
    }
}
